
<!-- <div class="form-group">
    <label class="col-lg control-label">是否使用多商户</label>
    <div class="col-sm-8">
        <label class="radio-inline">
            <input type="radio" name='is_use_merch' value="1" {if $item['is_use_merch']==1}checked{/if} /> 是
        </label>
        <label class="radio-inline">
            <input type="radio" name='is_use_merch' value="0" {if empty($item['is_use_merch'])}checked{/if} /> 否
        </label>
    </div>
</div>

<div class="form-group">
    <label class="col-lg control-label">是否使用区域代理</label>
    <div class="col-sm-8">
        <label class="radio-inline">
            <input type="radio" name='is_use_abonus_agent' value="1" {if $item['is_use_abonus_agent']==1}checked{/if} /> 是
        </label>
        <label class="radio-inline">
            <input type="radio" name='is_use_abonus_agent' value="0" {if empty($item['is_use_abonus_agent'])}checked{/if} /> 否
        </label>
    </div>
</div>

<div class="form-group">
    <label class="col-lg control-label">是否使用全民股东</label>
    <div class="col-sm-8">
        <label class="radio-inline">
            <input type="radio" name='is_use_globonus_partner' value="1" {if $item['is_use_globonus_partner']==1}checked{/if} /> 是
        </label>
        <label class="radio-inline">
            <input type="radio" name='is_use_globonus_partner' value="0" {if empty($item['is_use_globonus_partner'])}checked{/if} /> 否
        </label>
    </div>
</div>

<div class="form-group">
    <label class="col-lg control-label">是否使用门店管理</label>
    <div class="col-sm-8">
        <label class="radio-inline">
            <input type="radio" name='is_use_mendian' value="1" {if $item['is_use_mendian']==1}checked{/if} /> 是
        </label>
        <label class="radio-inline">
            <input type="radio" name='is_use_mendian' value="0" {if empty($item['is_use_mendian'])}checked{/if} /> 否
        </label>
    </div>
</div>

<div class="form-group">
    <label class="col-lg control-label">是否使用自定义表单</label>
    <div class="col-sm-8">
        <label class="radio-inline">
            <input type="radio" name='is_use_diymenu' value="1" {if $item['is_use_diymenu']==1}checked{/if} /> 是
        </label>
        <label class="radio-inline">
            <input type="radio" name='is_use_diymenu' value="0" {if empty($item['is_use_diymenu'])}checked{/if} /> 否
        </label>
    </div>
</div> -->

<div class="form-group-title">显示条件</div>
<div class="form-group">
    <label class="col-lg control-label">是否启用显示条件</label>
    <div class="col-sm-8">
        <label class="radio-inline">
            <input type="radio" name='is_use_show_condition' value="1" {if $item['is_use_show_condition']==1}checked {/if} onclick="idedshow('show')"/> 启用
        </label>
        <label class="radio-inline">
            <input type="radio" name='is_use_show_condition' value="0" {if empty($item['is_use_show_condition'])}checked {/if} onclick="idedhide('show')"/> 不启用
        </label>
    </div>
</div>


<div id="show" {if empty($item['is_use_show_condition'])}style="display:none;"{/if}>
    {if $setting['is_use_self_condition'] == 1}
    <div class="form-group">
        <label class="col-lg control-label">是否启用本身身份购买权限限制</label>
        <div class="col-sm-8">
            <label class="radio-inline">
                <input type="radio" name='is_use_self_condition' value="1" {if $item['is_use_self_condition']==1}checked{/if}  onclick="idedshow('buy_condition1')"/> 启用
            </label>
            <label class="radio-inline">
                <input type="radio" name='is_use_self_condition' value="0" {if empty($item['is_use_self_condition'])}checked{/if} onclick="idedhide('buy_condition1')"/> 不启用
            </label>
        </div>
    </div>
    <div class="form-group" id="buy_condition1" {if empty($item['is_use_self_condition'])}style="display:none;"{/if}>
        <label class="col-lg control-label">本身身份购买权限</label>
        <div class="col-sm-8" id="buy_condition1">
            {loop $identity $row}
            <input type="checkbox" name="self_condition[]" value="{$row['id']}" {if in_array($row['id'], $self_condition)}checked{/if}> {$row['name']}
            {/loop}
        </div>
    </div>
    {/if}
    {if $setting['is_use_buy_condition'] == 1}
    <div class="form-group">
        <label class="col-lg control-label">是否启用上一级身份购买权限限制</label>
        <div class="col-sm-8">
            <label class="radio-inline">
                <input type="radio" name='is_use_buy_condition' value="1" {if $item['is_use_buy_condition']==1}checked{/if}  onclick="idedshow('buy_condition2')"/> 启用
            </label>
            <label class="radio-inline">
                <input type="radio" name='is_use_buy_condition' value="0" {if empty($item['is_use_buy_condition'])}checked{/if} onclick="idedhide('buy_condition2')"/> 不启用
            </label>
        </div>
    </div>

    <div class="form-group" id="buy_condition2" {if empty($item['is_use_buy_condition'])}style="display:none;"{/if}>
        <label class="col-lg control-label">上一级身份购买权限</label>
        <div class="col-sm-8" id="buy_condition1">
            {loop $identity $row}
            <input type="checkbox" name="up_buy_condition[]" value="{$row['id']}" {if in_array($row['id'], $up_buy_condition)}checked{/if}> {$row['name']}
            {/loop}
        </div>
    </div>
    {/if}
</div>

<div class="form-group">
    <label class="col-lg control-label">是否启用购买数量限制</label>
    <div class="col-sm-8">
        <label class="radio-inline">
            <input type="radio" name='buy_num_limit' value="1" {if $item['buy_num_limit']==1}checked{/if} /> 启用
        </label>
        <label class="radio-inline">
            <input type="radio" name='buy_num_limit' value="0" {if empty($item['buy_num_limit'])}checked{/if} /> 不启用
        </label>
    </div>
</div>


<div class="form-group-title">身份协议</div>
<div class="form-group">
    <label class="col-lg control-label">身份协议</label>
    <div class="col-sm-8">
        {ife 'identity.user' $item}
        <textarea name="grade_agreement" class="form-control textarea">{$item['grade_agreement']}</textarea>
        {else}
        <div class="form-control-static">{$item['grade_agreement']}</div>
        {/if}
    </div>
</div>
<div class="form-group">
    <label class="col-lg control-label">显示方式</label>
    <div class="col-sm-8">
        <label class="radio-inline">
            <input type="radio" name='show_type' value="1" {if $item['show_type']==1}checked{/if} /> 入口弹出
        </label>
        <label class="radio-inline">
            <input type="radio" name='show_type' value="2" {if $item['show_type']==2}checked{/if} /> 链接
        </label>
        <label class="radio-inline">
            <input type="radio" name='show_type' value="0" {if empty($item['show_type'])}checked{/if} /> 无
        </label>
    </div>
</div>




<div class="form-group-title">身份详情</div>
<div class="form-group">
    <label class="col-lg control-label">是否使用身份详情</label>
    <div class="col-sm-8">
        <label class="radio-inline">
            <input type="radio" name='is_use_identity_detail' value="1" onclick="idedshow('identity_detail1')" {if $item['is_use_identity_detail']==1}checked{/if} /> 使用
        </label>
        <label class="radio-inline">
            <input type="radio" name='is_use_identity_detail' value="0" onclick="idedhide('identity_detail1')" {if empty($item['is_use_identity_detail'])}checked{/if} /> 不使用
        </label>
    </div>
</div>
<div class="form-group" id="identity_detail1" {if empty($item['is_use_identity_detail'])}style="display:none;"{/if}>
    <label class="col-lg control-label">身份详情</label>
    <div class="col-sm-8">
        {ifp 'commission.set.edit'}
        {php echo tpl_ueditor('identity_detail',$item['identity_detail'],array('height'=>200))}
        {else}
        <textarea id='identity_detail' style='display:none'>{$item['identity_detail']}</textarea>
        <a href='javascript:preview_html("#identity_detail")' class="btn btn-default">查看内容</a>
        {/if}
    </div>
</div>
<script type="text/javascript">
    function idedshow(obj){
        console.log(obj);
        $("#"+obj).attr('style', 'display:block;');
        if(obj == 'buy_condition'){
            $.ajax({
                type: "POST",
                url: "{php echo webUrl('identity/user/get_identity')}",
                data: {levelnum: $('#levelnum').val()},
                dataType: "json",
                success: function (data) {
                    var result = data.result.identity;
                    var html = "";

                    for (var i = 0; i < result.length; i++) {
                        html += ' <input type="checkbox" name="up_buy_condition[]" value="'+result[i]['id']+'"> '+result[i]['name']; 
                        
                    }

                    $('#buy_condition1').html(html);
                }
            });
        }
    }
    function idedhide(obj){
        $("#"+obj).attr('style', 'display:none;');
    }
</script>


<div class="form-group-title">备注</div>
<div class="form-group">
    <label class="col-lg control-label">备注</label>
    <div class="col-sm-8">
        {ife 'identity.user' $item}
        <textarea name="remarks" class="form-control textarea">{$item['remarks']}</textarea>
        {else}
        <div class="form-control-static">{$item['remarks']}</div>
        {/if}
    </div>
</div>
<!--OTEzNzAyMDIzNTAzMjQyOTE0-->